<%@page import="com.demoweb.model.dao.BoardDao"%>
<%@page import="com.demoweb.model.dto.Board"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<%
	Board board = (Board)request.getAttribute("board");
	String pageNo = request.getParameter("pageno");
	if (pageNo == null || pageNo.length() == 0)
		pageNo = "1";
%>
	
<!DOCTYPE html>


<html>
<head>
	<meta charset="utf-8" />
	<title>글 수정</title>
	<link rel="Stylesheet" href="/flappy/styles/default.css" />
	<link rel="Stylesheet" href="/flappy/styles/input2.css" />
</head>
<body>
	<div id="pageContainer">
	
		<%	pageContext.include("/WEB-INF/views/flappy/header.jsp");%>
		
		<div style="padding-top:25px;text-align:center">
		<div id="inputcontent">
		    <div id="inputmain">
		        <div class="inputsubtitle">게시판 글 쓰기</div>
		        <form action="update.action" method="post">
		        <table>
		            <tr>
		                <th>제목</th>
		                <td>
		                	<input type="hidden" name="pageno" 
		                		value="<%= pageNo %>" />
		                	<input type="hidden" name="boardno" 
		                		value="<%= board.getBoardNo() %>" />
		                	<input type="text" name="title" style="width:550px"
		                		value="<%= board.getTitle() %>" />
		                </td>
		            </tr>
		            <tr>
		                <th>작성자</th>
		                <td><%= board.getWriter() %></td>
		            </tr>
		            <tr>
		                <th>작성일</th>
		                <td><%= board.getRegDate() %></td>
		            </tr>
					<tr>
		                <th>조회수</th>
		                <td><%= board.getReadCount() %></td>
		            </tr>
		            <tr>
		                <th>내용</th>
		                <td>
							<textarea 
		                    	name="content" style="width:580px" 
		                    	rows="15"><%= board.getContent() %></textarea>
		                </td>
		            </tr>
		        </table>
		        </form>
		        <div class="buttons">
		        	<!--  <input type="submit" value="수정" /> -->
		        	<a href="javascript:document.forms[0].submit();">수정</a>
		        	&nbsp;
		        	<a href="javascript:history.back();">취소</a>
		        </div>
		    </div>
		</div>   	
	
	</div>
	</div>

</body>
</html>